a = {
    'x':1,
    'y':2,
    'z':3,
}

b = {
    'w':10,
    'y':20,
    'z':3
}

eq = a.keys() & b.keys()
print(eq)

not_in = a.keys() - b.keys()
print(not_in)

# 字典a 与字典b 作比较，会剔除 a b 中相同的 key 的值
diff = a.items() - b.items()
#返回 {('x', 1), ('y', 2)}
print(diff)